package com.luhuiguo.gwt.mvp.dispatcher.client.gin;

import com.google.inject.Provides;
import com.google.inject.Singleton;
import com.luhuiguo.gwt.mvp.dispatcher.client.DefaultExceptionHandler;
import com.luhuiguo.gwt.mvp.dispatcher.client.DispatcherAsync;
import com.luhuiguo.gwt.mvp.dispatcher.client.ExceptionHandler;
import com.luhuiguo.gwt.mvp.dispatcher.client.SecuredDispatcherAsync;

/**
 * 
 * @author LuHuiguo
 * @version $Id: SecuredDispatcherModule.java 8 2009-12-25 03:02:51Z luhuiguo $
 */
public class SecuredDispatcherModule extends AbstractDispatcherModule {

    public SecuredDispatcherModule() {
        this( DefaultExceptionHandler.class );
    }
    
    public SecuredDispatcherModule(Class<? extends ExceptionHandler> exceptionHandlerType) {
        super(exceptionHandlerType);
    }
    
    @Provides
    @Singleton
    protected DispatcherAsync provideDispatcherAsync( ExceptionHandler exceptionHandler) {
        return new SecuredDispatcherAsync( exceptionHandler);
    }

}
